package com.wgy.day8;/*定义一个方法  用来判断2个数字是否相同*/

public class Demo20201104_4 {
    public static void main(String[] args) {
        //same(2, 3);
       System.out.println(same(2, 5));
        //same1(2, 2);
       System.out.println(same1(2,2));
       // same2(2,2);
        System.out.println(same2(2,2));
      //  same3(2,2);
        System.out.println(same3(2,2));
    }


    public static boolean same(int a, int b) {
        boolean c = a == b ? true : false;
        //return c;

        return c;

    }

    public static boolean same1(int a, int b) {
        boolean c;
        if (a == b) {
            c = true;
        } else {
            c = false;
        }
        return c;
    }
    public static boolean same2(int a, int b) {
        boolean c= a==b;
        return c;
    }
    public static boolean same3(int a, int b) {

        return a==b;
    }

}

